<style type="text/css">
.dialog .dialogContent {
    overflow: auto;
}

.my-uploadify-button {
    background: none;
    border: none;
    text-shadow: none;
    border-radius: 0;
}

.uploadify-queue-item {
    padding: 5px;
}

.uploadify:hover .my-uploadify-button {
    background: none;
    border: none;
}

.fileQueue {
    width: 450px;
    height: 120px;
    overflow: auto;
    border: 1px solid;
    border-color: #E5E5E5;
    float: left;
    clear: left;
}

#fileupload {
    margin-bottom: 5px;
}
</style>
<div class="pageContent" style=" width:90%">
<form method="post" id="handleTaskFrom" action="${rc.getContextPath()}/manage/workflow/completeTask" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
    <div id="businessOperation" url="${formKey!''}">
    <!--此处初始化表单  -->
    </div>
    <div class="panel" style="display: block;margin: 0px">
        <div class="panelHeader">
            <div class="panelHeaderContent"><h1 style="cursor: move;">审核信息</h1></div>
        </div>
        <div class="panelContent pageFormContent">
        <input type="hidden" name="navTabId" value="${navTabId!''}">
        <input type="hidden" name="taskId" value="${taskId!''}">
        <input type="hidden" name="businessKey" value="${businessKey!''}">
        <!-- 默认是同意的 -->
        <input type="hidden" name="flowMap_ispass" value="0">
        
        <#if custombutton?? && custombutton == true>
        </div> <!-- pageFormContent div end -->
        <#else>
        <fieldset style="border:1px dashed #d8dfe5">
            <dl class="nowrap">
                <dt><@label key="suggestion.C,colon">意见：</@label></dt>
                <dd>
                    <textarea name="flowMap_suggestion" rows="2" cols="70"></textarea>
                </dd>
            </dl>
        </fieldset>
        </div> <!-- pageFormContent div end -->
    </div>
    <div class="formBar">
        <ul>
            <li><div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit"><@label key="agree.C">同意</@label></button>
                    </div>
                </div></li>
            <li onclick="processTaskJs._reject();">
                <div class="buttonActive" >
                    <div class="buttonContent">
                        <button type="button"><@label key="disagree.C">不同意</@label></button>
                    </div>
                </div>
            </li>
            <li>
                <div class="buttonActiveGrey">
                    <div class="buttonContent">
                        <button type="button" class="close"><@label
                            key="cancel.B">取消</@label></button>
                    </div>
                </div>
            </li>
        </ul>
    </div>
    </#if>
</form>
<div class="tabs">
    <div class="tabsHeader">
        <div class="tabsHeaderContent">
            <ul>
                <li id="component" data-selectedid="process_hostory"
                    class="exerInputS"><a href="javascript:;" id="select1"><span><@label key="workflowHistory.C">流程记录</@label></span></a></li>
            </ul>
        </div>
    </div>
    <div class="tabsContent">
        <div>
            <table class="table" width="90%" >
                <thead>
                    <tr>
                        <th width="40"><@label key="flowNodeName.C">节点名称</@label></th>
                        <th width="80"><@label key="flowHandleUser.C">处理人</@label></th>
                        <th width="100"><@label key="flowHandleTime.C">处理时间</@label></th>
                        <th width="100"><@label key="useTime.C">耗时</@label></th>
                        <th width="50"><@label key="handleResult.C">结果</@label></th>
                        <th width="200"><@label key="suggestion.C">意见</@label></th>
                    </tr>
                </thead>
                <tbody>
                    <#if historys??> <#list historys as history>
                    <tr>
                        <td>${history.taskName!''}</td>
                        <td>${history.userText!''}</td>
                        <td>${(history.checkTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}</td>
                        <td>${history.useTime!''}</td>
                        <td>${history.result!''}</td>
                        <td>${history.suggestion!''}</td>
                    </tr>
                    </#list> <#else>
                    <tr>
                        <td colspan="11" class="noData">======<@label
                            key='noListData.C'>列表无数据</@label>=====</font>
                        </td>
                    </tr>
                    </#if>
                </tbody>
            </table>
        </div>
    </div>
</div>
</div> <!-- pageContent div end -->
<script type="text/javascript">
    $(function(){
        var redirectUrl = $("#businessOperation", $.pdialog.getCurrent()).attr("url");
        $("#businessOperation", $.pdialog.getCurrent())
        .load(hostUrl + redirectUrl, null, function(response,status,xhr){
            initUI($.pdialog.getCurrent());
        });
        
    })
    var processTaskJs = {
        _reject : function() {
            var suggestion = $("textarea[name='flowMap_suggestion']",
                    $.pdialog.getCurrent()).val();
            if (suggestion && suggestion != "") {
                //驳回值为1
                $("input[name='flowMap_ispass']").val("1");
                $("#handleTaskFrom").submit();
            } else {
                alertMsg.error("驳回请填写意见!");
                return false;
            }
        }
    }
</script>